<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head><body>
	<!-- start md5加密，生成字符串的md5值 -->
	<div style="text-align:center;">
		<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
			<input type="text" name="text_string" id="text_string" /><br />
			<input type="submit" value="生成MD5值" />
		</form>
		<?php
			if ($_SERVER['REQUEST_METHOD']=='POST') {
				$text_string = $_POST['text_string'];
			?> 
			<div style="margin-top:50px;border-style:solid;border-width:1px;padding:15px;">
				<?php echo md5($text_string);?>  
			</div>
			<?php
			}
		?> 
	</div>
	<!-- end -->
</body></html>
